<!DOCTYPE html>
<html>
<head>
  <title></title>
  <script type="text/javascript" src="static/jquery.js"></script>
</head>
<body style="background-color: #ddd;">
  <script type="text/javascript">
    $(function(){
      $("form").submit(function(e){
        var form = $(this)

        setTimeout(function(){
          $.post("/users", form.serialize()).done(function(data){
            var span = $("<span><strong>form success!</strong></span>")
            span.append(JSON.stringify(data))
            form.append(span)
          })
        }, 500)

        return false
      })
    })
  </script>

  <form>
    What is your name?
    <input name="name">
    <button id="submit" type="submit">submit</button>
  </form>
</body>
